;--------------------------------------
;
; strlwr.asm
;
; convert string to lower case
;
;

;--------------------------------------
;
; include defs, prototypes and macros
;

include tab6.inc

;--------------------------------------
;
; begin code segment
;

	.CODE

;--------------------------------------
;
; strlwr()
;
; strlwr requires that the
; PREPARE_STRING macro be utilized
; before strlwr is INVOKED
; 

strlwr	PROC PASCAL PUBLIC USES ds si,srce:PBYTE

; initialize source

 IF mdl eq 3

; set srce ds:[si]

        lds     si,srce

  ELSE

; set srce ds:[si]

        mov     si,srce

  ENDIF

	.WHILE 1
	mov	al,BYTE PTR ds:[si]
	.BREAK .IF (al==0)
	.IF( al>='A' && al<='Z')
	or	al,20h
	mov	BYTE PTR ds:[si],al
	.ENDIF
	inc	si
	.ENDW
	ret	                       ; return to caller
strlwr	ENDP

;
; end of strlwr procedure
;
;--------------------------------------

	END

;
; end of strlwr.asm
;
;--------------------------------------


